// Copyright (c) 2010 School of Software, Tsinghua University, Beijing (China)
// All rights reserved.
//
// This file is part of Geoxiom (http://code.google.com/p/geoxiom/); you may 
// redistribute it under the terms of the GNU Lesser General Public License.
// Licensees holding a valid commercial license may use this file in
// accordance with the commercial license agreement provided with the software.
//
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
//
// Author(s) : Kan-Le Shi

#ifndef GEOXIOM_MATHS_VECTOR3_HPP
#define GEOXIOM_MATHS_VECTOR3_HPP

#include "real.hpp"

namespace Geoxiom {
namespace Maths {

typedef class Vector3 {
public:
	Real x;
	Real y;
	Real z;

public:
	Vector3 operator+(const Vector3 &v) const {
		return Vector3(x + v.x, y + v.y, z + v.z);
	}

	Vector3 operator-(const Vector3 &v) const {
		return Vector3(x - v.x, y - v.y, z - v.z);
	}

	Vector3 operator*(const Real v) const {
		return Vector3(x * v, y * v, z * v);
	}

public:
	Vector3(const Real x_, const Real y_, const Real z_) : x(x_), y(y_), z(z_) { }
	Vector3(const Vector3 &v) : x(v.x), y(v.y), z(v.z) { }

} *Vector3Ptr, *Vector3Array;

}
}

#endif